<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
  <meta name="description" content="">
  <meta name="author" content="ThemeBucket">
  <link rel="shortcut icon" th:href="@{#}" type="image/png">

  <title>商品管理</title>

  <!--data table-->
  <link rel="stylesheet" th:href="@{/js/data-tables/DT_bootstrap.css}" />

  <div th:include="common :: commonheader"/>
</head>

<body class="sticky-header">

<section>
    <!-- left side start-->
    <div th:replace="common :: #leftmenu " ></div>
    <!-- left side end-->
    
    <!-- main content start-->
    <div class="main-content" >

        <!-- header section start-->
        <div th:replace="common :: headermenu" ></div>
        <!-- header section end-->

        <!-- page heading start-->
        <div class="page-heading">
            <h3>
                订单管理
            </h3>
            <ul class="breadcrumb">
                <li>
                    <a th:href="@{/main.html}">首页</a>
                </li>
                <li class="active">订单管理</li>
            </ul>
        </div>
        <!-- page heading end-->

        <!--body wrapper start-->
        <div class="wrapper">
             <div class="row">
                <div class="col-sm-12">
                <section class="panel">
                <header class="panel-heading">
                    订单管理
                    <span class="tools pull-right">
                        <a href="javascript:;" class="fa fa-chevron-down"></a>
                        <a href="javascript:;" class="fa fa-times"></a>
                     </span>
                </header>
                <div class="panel-body">
                <div class="adv-table editable-table ">
                <div class="clearfix">
<!--                    <div class="btn-group">-->
<!--&lt;!&ndash;                        id="editable-sample_new"&ndash;&gt;-->
<!--                        <form th:action="@{/product/insert}" method="get">-->
<!--                        <button  class="btn btn-primary">-->
<!--                            添加新商品 <i class="fa fa-plus"></i>-->
<!--                        </button>-->
<!--                        </form>-->
<!--                    </div>-->
                    <div class="btn-group pull-right">
                        <button class="btn btn-default dropdown-toggle" data-toggle="dropdown">Tools <i class="fa fa-angle-down"></i>
                        </button>
                        <ul class="dropdown-menu pull-right">
                            <li><a href="#">Print</a></li>
                            <li><a href="#">Save as PDF</a></li>
                            <li><a href="#">Export to Excel</a></li>
                        </ul>
                    </div>
                </div>
                <div class="space15"></div>
                <table class="table table-striped table-hover table-bordered" id="editable-sample">
                <thead>
                <tr>
                    <th>Order Number</th>
                    <th>Time</th>
                    <th>Status</th>
                    <th>Pay Type</th>
                    <th>Member Name</th>
                    <th>Detail</th>
                    <th>Close</th>
                    <th>Open</th>
                </tr>
                </thead>
                <tbody>

                <tr class="" th:each="order:${orders}" th:if="${order.deleted} eq 0">
                    <td th:text="${order.orderNum}"></td>
                    <td th:text="${order.orderTime}"></td>
                    <td th:text="${order.orderStatusStr}"></td>
                    <td th:text="${order.payTypeStr}"></td>
                    <td  class="center"><a th:text="${order.member.name}" th:style="'color:#00f'" th:href="@{/member/detail/{id}(id = ${order.member.id})}"></a></td>
                    <td><a th:href="@{/orders/detail/{id}(id=${order.id})}" th:style="'color:#00f'">Detail</a></td>
                    <td><a th:href="@{/orders/close/{id}(id=${order.id})}" th:style="'color:#00f'" th:text="${order.orderStatus}==1?'Close':'Delete'">Close</a></td>
                    <td><a th:href="@{/orders/open/{id}(id=${order.id})}" th:style="'color:#00f'" th:text="${order.orderStatus}==0?'Open':''">Open</a></td>
                </tr>

                </tbody>
                </table>
                </div>
                </div>
                </section>
                </div>
                </div>
            <div class="row">
                <div class="col-sm-12">
                    <section class="panel" >
                        <header class="panel-heading">
                            删除历史
                            <span class="tools pull-right">
                        <a href="javascript:;" class="fa fa-chevron-up"></a>
                        <a href="javascript:;" class="fa fa-times"></a>
                     </span>
                        </header>
                        <div class="panel-body" style="display: none;">
                            <div class="adv-table editable-table ">
                                <div class="clearfix">
                                    <!--                    <div class="btn-group">-->
                                    <!--&lt;!&ndash;                        id="editable-sample_new"&ndash;&gt;-->
                                    <!--                        <form th:action="@{/product/insert}" method="get">-->
                                    <!--                        <button  class="btn btn-primary">-->
                                    <!--                            添加新商品 <i class="fa fa-plus"></i>-->
                                    <!--                        </button>-->
                                    <!--                        </form>-->
                                    <!--                    </div>-->

                                </div>
                                <div class="space15"></div>
                                <table class="table table-striped table-hover table-bordered" >
                                    <thead>
                                    <tr>
                                        <th>Order Number</th>
                                        <th>Time</th>
                                        <th>Status</th>
                                        <th>Pay Type</th>
                                        <th>Member Name</th>
                                        <th>Detail</th>
                                        <th>Recovery</th>
                                    </tr>
                                    </thead>
                                    <tbody>

                                    <tr class="" th:each="order:${orders}" th:if="${order.deleted} eq 1">
                                        <td th:text="${order.orderNum}"></td>
                                        <td th:text="${order.orderTime}"></td>
                                        <td th:text="${order.orderStatusStr}"></td>
                                        <td th:text="${order.payTypeStr}"></td>
                                        <td  class="center"><a th:text="${order.member.name}" th:style="'color:#00f'" th:href="@{/member/detail/{id}(id = ${order.member.id})}"></a></td>
                                        <td><a th:href="@{/orders/detail/{id}(id=${order.id})}" th:style="'color:#00f'">Detail</a></td>
                                        <td><a th:href="@{/orders/recovery/{id}(id=${order.id})}" th:style="'color:#00f'">Recovery</a></td>
                                    </tr>

                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </section>
                </div>
            </div>
        </div>
        <!--body wrapper end-->

        <!--footer section start-->
        <footer>
            2020 &copy; AdminEx by ThemeBucket </a>
        </footer>
        <!--footer section end-->


    </div>
    <!-- main content end-->
</section>

<div th:include="common :: #commonscript" />

<!--data table-->
<script type="text/javascript" th:src="@{/js/data-tables/jquery.dataTables.js}"></script>
<script type="text/javascript" th:src="@{/js/data-tables/DT_bootstrap.js}"></script>



<!--script for editable table-->
<script th:src="@{/js/editable-table.js}"></script>

<!-- END JAVASCRIPTS -->
<script>
    jQuery(document).ready(function() {
        EditableTable.init();
    });
</script>

</body>
</html>
